
    <script src="whiff_middleware/whiff.js"></script>

    <h1>Load from server test</h1>
    
    Below is a simple table
    <center>
    <table border>
    <tr>
    <td id="myElementId">THIS IS THE OLD VALUE</td>
    <td> <input type="BUTTON" name="BUTTON" value="BUTTON" onclick="buttonClick()"> </td>
    </tr>
    </table>
    </center>
    When you click the button the value should change to THE NEW VALUE
    and you should get an alert saying "YOU CLICKED".  Behind the scenes
    is a (trivial) round trip back to the server to expand the template.
    <script>
    
var buttonClick= 
function () {
 var templateArray = [
"\n"
,"\/\/ Generate HTML and javascript at server to execute here\n"
,"\/\/ first load template to the element innerHTML\n"
,"        {{include \"whiff_middleware\/setInnerHtml\"}}\n"
,"            {{using elementName}}myElementId{{\/using}}\n"
,"            {{using page}}THE NEW VALUE{{\/using}}\n"
,"        {{\/include}}\n"
,"        ; \/\/ end of code to load HTML\n"
,"\/\/ then execute the javascript\n"
,"        alert('YOU CLICKED')\n"
,""
];
 var url = "http:\/\/localhost:8888\/whiff_middleware\/expandPostedTemplate";
 var prefix = "";
 var asynchronous = false;
 var relativeUrl = null;
 jswhiff_exec_template(url, templateArray, prefix, asynchronous, relativeUrl);
}
;
</script>
